public class Test {
    public static void main(String[] args) {


        for (int n = 10; n <= 100000; n++) {
            int x = 1;
            int count = 0;
            do {
                for (int y = 1; y <= n; y++) {
                    count++;
                    x = x + y;
                }
            } while (x < 10 + n * n);
            if (2 * n != count) {
                System.out.println(0);
                System.out.println(n);
                System.out.println(2 * n);
                System.out.println(count);
                return;
            }
        }

        System.out.println(1);

    }
}
